package ltd.newbee.mall.exception;

import ltd.newbee.mall.enums.ResultEnum;

/**
 * @ClassName: marketException
 * @Description: 自定义异常
 * @Author: bwh
 * @Date: 2021/9/2 15:42
 * @Version 1.0
 */
public class MarketException extends RuntimeException {
    private final Integer code;

    public MarketException(ResultEnum resultEnum)
    {
        super(resultEnum.getMessage());

        this.code = resultEnum.getCode();
    }

    public MarketException(Integer code, String message)
    {
        super(message);
        this.code = code;
    }

}
